﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace F2S.OAuth
{
    public class OAuthCredentials
    {
        public OAuthUserCredentials UserCredentials { get; set; }
        public OAuthAppCredentials AppCredentials { get; set; }
        public string AccessToken { get; set; }

        public bool EmptyAccessToken { get { return string.IsNullOrEmpty(AccessToken); }}

        public OAuthCredentials(string apiKey, string apiSecret, string userToken, string userSecret)
        {
            UserCredentials = new OAuthUserCredentials(userToken, userSecret);
            AppCredentials = new OAuthAppCredentials(apiKey, apiSecret);
        }

        public OAuthCredentials(string apiKey, string apiSecret)
        {
            AppCredentials = new OAuthAppCredentials(apiKey, apiSecret);
        }

        public OAuthCredentials(string apiKey, string apiSecret, string accessToken)
        {
            AppCredentials = new OAuthAppCredentials(apiKey, apiSecret);
            AccessToken = accessToken;
        }
    }
}
